import com.gzc.pojo.School;
import com.gzc.util.QueryListUtil;
import com.sun.deploy.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

public class Test2 {

	public static void main(String[] args){
		School school = new School((byte) 1,"广东省",(long) 1);
		School school1 = new School(null,"广西省",(long)2);
		School school2 = new School((byte) 2,"广东省",(long)3);
		School school3 = new School((byte) 1,"北京市",(long)4);
		School school4 = new School((byte) 1,"广东省",(long)5);
		School school5 = new School((byte) 0,"广东省",(long)6);

		ArrayList<School> list = new ArrayList<>();
		list.add(school);
		list.add(school1);
		list.add(school2);
		list.add(school3);
		list.add(school4);
		list.add(school5);

		ArrayList<Long> longs = new ArrayList<>();
		longs.add((long) 1);
		longs.add((long) 3);
		longs.add((long) 4);
		ArrayList<Byte> formal = new ArrayList<>();
		formal.add((byte) 1);
		formal.add((byte) 2);
		ArrayList<String> province = new ArrayList<>();
		province.add("北京市");
	/*	List<School> list1 = QueryListUtil.getInstance()
				.addEqualCondition("formal", formal,QueryListUtil.ConditionName.IN)
				.addEqualCondition("province",province,QueryListUtil.ConditionName.IN)
				.query(list);

		//System.out.println(list1);
		List<School> list2 = QueryListUtil.getInstance()
				.addEqualCondition("formal", formal,QueryListUtil.ConditionName.IN)
				.query(list);

		System.out.println(list2);*/

		QueryListUtil instance = QueryListUtil.getInstance();
		if (formal != null) {
			instance.addInCondition("formal", formal);
		}
		if (province != null) {
			//instance.addEqualCondition("province", province, QueryListUtil.ConditionName.IN);
		}

		List<School> query = instance.query(list);
		System.out.println(query);


		//List<School> query = QueryListUtil.getInstance().query(list);

		//System.out.println(query);
	}
}
